#include "Channel.h"
#include "EventLoop.h"

void Channel::writeEventEnable(void) {
	events = events | EVENT_WRITE;
    loop->updateChannelEvent(fd, this);
}

void Channel::writeEventDisable(void) {
	events = events & ~EVENT_WRITE;
	loop->updateChannelEvent(fd, this);
}


void Channel::add(int fd) {
    loop->addChannelEvent(fd, this);
}

void Channel::remove(int fd) {
    loop->removeChannelEvent(fd, this);
}
